package com.ichoice.rabbitmq.rpc.slove;

import cn.hutool.json.JSONObject;
import com.ichoice.rabbitmq.rpc.User;
import com.ichoice.rabbitmq.rpc.helper.ClientListenServerCallback;
import com.ichoice.rabbitmq.rpc.helper.model.CallBackModel;
import org.springframework.stereotype.Service;

@Service
public class Slove1 implements ClientListenServerCallback {
    @Override
    public void listenServerCallback(CallBackModel callBackModel) {
        System.out.println(" slove1 ==========>");
        if (callBackModel.getCode() == 200) {
            System.out.println(callBackModel.getRes().toString());
        }
    }


    public void test2(CallBackModel callBackModel) {
        System.out.println("test2 ==========>");
        if (callBackModel.getCode() == 200) {
            System.out.println(callBackModel.getRes().toString());
        }
    }


    public void test3(JSONObject user) {
        System.out.println("i am user details:" + user.toString());
    }

    public void test4(int age) {
        System.out.println("how old am i?" + age);
    }

    public void test5(User user) {
        System.out.println("i am user details55555:" + user.toString());
    }


    public void test6(String message){
        System.out.println("接收到发布-订阅消息:" + message);
    }


    public void test7(User user){
        System.out.println("接收到发布-订阅消息:" + user.toString());
    }
}
